package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.ExperimentProcessResult;
import com.zhijian.medical.entity.vo.request.ExperimentProcessResultSearchVo;
import com.zhijian.medical.entity.vo.response.ExperimentProcessResultVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExperimentProcessResultMapper {
    int deleteByPrimaryKey(Long id);

    /**
     * 根据实验流程id进行删除
     *
     * @param experimentProcessId
     * @return
     */
    int deleteByExperimentProcessId(Long experimentProcessId);

    /**
     * 根据实验流程id与项目进行删除
     *
     * @param experimentProcessId
     * @param project
     * @return
     */
    int deleteByExperimentProcessIdAndProject(@Param("experimentProcessId") Long experimentProcessId, @Param("project") String project);

    /**
     * 根据实验流程id与项目与设备id进行删除
     *
     * @param experimentProcessId
     * @param project
     * @param deviceId
     * @return
     */
    int deleteByExperimentProcessIdAndProjectAndDeviceId(@Param("experimentProcessId") Long experimentProcessId, @Param("project") String project,
                                                         @Param("deviceId") Long deviceId);

    /**
     * 根据实验流程id与设备id进行删除
     *
     * @param experimentProcessId
     * @param deviceId
     * @return
     */
    int deleteByExperimentProcessIdAndDeviceId(@Param("experimentProcessId") Long experimentProcessId, @Param("deviceId") Long deviceId);

    int insert(ExperimentProcessResult record);

    int insertSelective(ExperimentProcessResult record);

    ExperimentProcessResult selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ExperimentProcessResult record);

    int updateByPrimaryKey(ExperimentProcessResult record);

    int count(ExperimentProcessResultSearchVo experimentProcessResultSearchVo);

    List<ExperimentProcessResultVo> selectList(ExperimentProcessResultSearchVo experimentProcessResultSearchVo);

    ExperimentProcessResultVo selectVoById(Long id);
}